<?php
/**
* @version	1.0: producenci.php marum56 
* @package	Joomla
* @subpackage	Producenci
* @copyright	Copyright (C) 2011 All rights reserved.
* @license	
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

/*
 * Uprawnienie do wejścia do komponentu
 */
$user = & JFactory::getUser();
if (!$user->authorize( 'com_modele', 'manage' )) {
	$mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH'), 'error' );
}

// Prawo edycji formularza
$usertype = $user->get('usertype');
global $form_edit;
if ( strtolower($usertype) == 'administrator' OR strtolower($usertype) == 'serwis' ) {
 	$form_edit = true;
} else { 
 	$form_edit = false; 
}



// Require the base controller
require_once (JPATH_COMPONENT.DS.'controller.php');
// Klasa modelu
require_once (JPATH_COMPONENT.DS.'msModel.php');
// Klasa tablicy modelu
require_once (JPATH_COMPONENT.DS.'msTableModel.php');

// Create the controller
$controller	= new ModeleController( );

// Perform the Request task
$controller->execute( JRequest::getCmd('task'));
$controller->redirect();